<extend name="Public/base"/>
<block name="body">
    <div class="portlet box blue">
        <div class="portlet-title">
            <div class="caption"><i class="fa fa-reorder"></i>成绩分析【纪曌曌】</div>
            <div class="tools"><a href="javascript:;" class="collapse"></a><a href="javascript:;" class="remove"></a></div>
        </div>
        <div class="portlet-body form">
            <div class="col-md-12 panel-heading">
                <div class="table-responsive">
                    <table class="table table-bordered table-hover table-striped" style="margin-bottom:0;">
                        <thead>
                        <tr>
                            <th width="60">编号</th>
                            <th>科目</th>
                            <th>得分</th>
                            <th>年级最高分</th>
                            <th>年级最低分</th>
                            <th>班级最高分</th>
                            <th>班级最低分</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>1</td>
                            <td>语文</td>
                            <td>100</td>
                            <td >100</td>
                            <td>30</td>
                            <td >100</td>
                            <td>30</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="form-group margin-bottom-20 col-md-12">
                <label class="btn blue yellow-stripe col-md-2"><i class="fa fa-check-square-o"></i> 请选择查看类别</label>
                <div class="col-md-2">
                    <select class="form-control">
                        <option>按年级排名查看</option>
                        <option>按班级排名查看</option>
                    </select>
                </div>
                <div class="clearfix"></div>
            </div>


            <div class="col-md-12"><!--年级排名-->
                <div id="grade" style="width:100%;height:300px;"></div>
            </div>

            <div class="col-md-12"><!--班级排名-->
                <div id="subject" style="width:100%;height:300px;"></div>
            </div>

            <div class="clearfix"></div>
            <form>
                <div class="form-actions fluid">
                    <div class="col-md-offset-4 col-md-8">
                        <button type="submit" class="btn green">保存</button>
                        <button type="button" class="btn default">打印</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</block>

<block name="script">
    <script src="__JS__/echarts.common.min.js"></script>
    <script src="__STATIC__/scripts/app.js"></script>
    <script src="__STATIC__/scripts/table-managed.js"></script>
    <script>
        jQuery(document).ready(function() {
            App.init();
            TableManaged.init();
            highlight_subnav('{:U('User/classAndGrade')}');
        });

        $(function() {
            var grade = echarts.init(document.getElementById('grade'));//年级
            var subject = echarts.init(document.getElementById('subject'));//科目

            // 年级图表配置项和数据
            var gradeoption= {
                title: {
                    text: '单科年级排名分析'
                },
                tooltip: {
                    trigger: 'axis'
                },
                legend: {
                    data:['个人得分','年级最高分','年级最低分']
                },
                grid: {
                    left: '3%',
                    right: '4%',
                    bottom: '3%',
                    containLabel: true
                },
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    data: ['语文','数学','英语','历史','地理','政治','物理','化学','生物']
                },
                yAxis: {
                    type: 'value'
                },
                series: [
                    {
                        name:'个人得分',
                        type:'line',
                        stack: '总分',
                        data:[120, 132, 101, 134, 90, 130, 110,90,78]
                    },
                    {
                        name:'年级最高分',
                        type:'line',
                        stack: '总分',
                        data:[120, 112, 111, 98, 89, 78, 98,80,99]
                    },
                    {
                        name:'年级最低分',
                        type:'line',
                        stack: '总分',
                        data:[50, 45, 35, 23, 45, 60, 30,55,60]
                    },
                ]
            };

            var subjectoption =  {
                title: {
                    text: '单科班级排名分析'
                },
                tooltip: {
                    trigger: 'axis'
                },
                legend: {
                    data:['个人得分','班级最高分','班级最低分']
                },
                grid: {
                    left: '3%',
                    right: '4%',
                    bottom: '3%',
                    containLabel: true
                },
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    data: ['语文','数学','英语','历史','地理','政治','物理','化学','生物']
                },
                yAxis: {
                    type: 'value'
                },
                series: [
                    {
                        name:'个人得分',
                        type:'line',
                        stack: '总分',
                        data:[120, 132, 101, 134, 90, 130, 110,90,78]
                    },
                    {
                        name:'班级最高分',
                        type:'line',
                        stack: '总分',
                        data:[120, 112, 111, 98, 89, 78, 98,80,99]
                    },
                    {
                        name:'班级最低分',
                        type:'line',
                        stack: '总分',
                        data:[50, 45, 35, 23, 45, 60, 30,55,60]
                    },
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            grade.setOption(gradeoption);
            subject.setOption(subjectoption);
        });
    </script>
</block>